<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>添加</title>
<link rel="stylesheet" href="${ctx }/resources/layui/css/layui.css" media="all" />
<link rel="stylesheet" href="${ctx }/resources/css/public.css" media="all" />
<link rel="stylesheet" href="${ctx }/resources/zTree/css/metroStyle/metroStyle.css" type="text/css">
<link rel="stylesheet" type="text/css" href="${ctx }/resources/plugin/css/index.css">
<link rel="stylesheet" href="${ctx }/resources/layui/css/layui.css" media="all">
</head>
<body class="childrenBody">
	<form class="layui-form" action="#" id="frm" method="post" lay-filter="frm">
		<div class="layui-form-item">
    		<label class="layui-form-label">请假单标题</label>
    		<div class="layui-input-block">
      			<input type="text" name="title" id="title" lay-verify="title" disabled="disabled"
      			 value="${leaveBill.title }" autocomplete="off" placeholder="请输入标题" class="layui-input">
   			</div>
 		 </div>
 		 
	<div class="layui-form-item">
		<div class="layui-inline">
			<label class="layui-form-label">请假天数</label>
			<div class="layui-input-inline">
				<input type="text" name="days" id="days" lay-verify="required" disabled="disabled"
				 value="${leaveBill.days }"	autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-inline">
			<label class="layui-form-label">开始时间</label>
			<div class="layui-input-inline">
				<input type="text" name="leavetime" id="leavetime"  autocomplete="off" disabled="disabled" 
				 value="<fmt:formatDate value="${leaveBill.leavetime }" pattern="yyyy-MM-dd HH:mm:ss"/>" class="layui-input">
			</div>
		</div>
	</div>
 		 
		<div class="layui-form-item layui-form-text">
			<label class="layui-form-label">请假单原因</label>
			<div class="layui-input-block">
				<textarea class="layui-textarea" name="content"  disabled="disabled"
				lay-verify="content" id="content">${leaveBill.content }</textarea>
			</div>
		</div>
	</form>
	<table id="commonList" lay-filter="commonList"></table>
</body>
<script type="text/javascript" src="${ctx }/resources/layui/layui.js"></script>
<script type="text/javascript">
layui.use([ 'form','jquery','layer','table' ], function() {
	var form=layui.form;//得到form对象
	var $=layui.jquery;
	var table=layui.table;
	var layer = parent.layer === undefined ? layui.layer : parent.layer;
	
	//加载批注信息列表
    var tableIns = table.render({
        elem: '#commonList',
        url : '${ctx}/workFlow/queryCommonsByLeaveBillId.action?id=${leaveBill.id}',
        cellMinWidth : 95,
        toolbar: 'true',
        height : "full-225",
        defaultToolbar: ['filter'],
        id : "commonListTable",
        cols : [[
            {type: "checkbox", fixed:"left", minwidth:50},
            {field: 'time', title: '批注时间', minWidth:100, align:"center"},
            {field: 'userId', title: '批注人', minWidth:100, align:"center"},
            {field: 'message', title: '批注内容', minWidth:100, align:"center"}
        ]]
    });
	
});	

</script>
</html>